
/*
 * StockItemDialog.h
 *
 *  Created on: 05.04.2009
 *      Author: Konan Andrej
 */

#ifndef STOCKITEMDIALOG_H_
#define STOCKITEMDIALOG_H_

#include "ItemType.h"
#include "Debug.h"

#include <QDialog>

#include <QVBoxLayout>
#include <QHBoxLayout>
#include <QPushButton>
#include <QLineEdit>
#include <QComboBox>
#include <QLabel>


class StockItemDialog: public QDialog
{
	Q_OBJECT

private:
	QVBoxLayout* LabelsLayout;
	QVBoxLayout* EditLinesLayout;
	QHBoxLayout* ControlButtonsLayout;
	QVBoxLayout* StockItemDialogLayout;
	QHBoxLayout* EditFieldLayout;

	QLabel* ArticleLabel;
	QLabel* DescriptionLabel;
	QLabel* FormatLabel;

	QLineEdit* ArticleLineEdit;
	QLineEdit* DescriptionLineEdit;
	QComboBox* FormatComboBox;

	QPushButton* OkButton;
	QPushButton* CancelButton;

signals:
	void StockItemMade( StockItem stockItem );

private slots:
	void okPressed();

public:
	StockItemDialog( QWidget *parent = 0 );

	void SetItem( const StockItem& item );

};

#endif /* STOCKITEMDIALOG_H_ */
